package com.whiteape.book.model.bo;

public class TypefaceBo {
    public final static int STATE_TYPE_UNDOWNLOADED = 0;
    public final static int STATE_TYPE_DOWNLOADED = 1;
    public final static int STATE_TYPE_USING = 2;
    public final static int STATE_TYPE_DOWNLOADING = 3;

    private String name;
    private String state;
    private String size;
    private int stateType;
    private String action;
    private String url;

    public String getAction() {
        switch (stateType) {
            case STATE_TYPE_UNDOWNLOADED:
                return "下载";
            case STATE_TYPE_DOWNLOADED:
                return "使用";
            case STATE_TYPE_USING:
                return "使用中";
            case STATE_TYPE_DOWNLOADING:
                return "下载中";
        }
        return "下载";
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public int getStateType() {
        return stateType;
    }

    public void setStateType(int stateType) {
        this.stateType = stateType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getState() {
        switch (stateType) {
            case STATE_TYPE_UNDOWNLOADED:
                return "未下载";
            case STATE_TYPE_DOWNLOADED:
                return "已下载";
            case STATE_TYPE_USING:
                return "正在使用";
            case STATE_TYPE_DOWNLOADING:
                return "正在下载";
        }
        return "未知状态";
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }
}
